@import "../styles/variables";

.sms-editor {
	width: 500px;
}

.sms-keywords-holder {
	padding-right: 45px;
	position: relative;
}

.sms-keywords-toggle {
	border: 7px solid transparent;
	border-top-color: #7d7d7d;
	cursor: pointer;
	position: absolute;
		right: 10px;
		top: 14px;
	-webkit-transform-origin: 50% 25%;
	transform-origin: 50% 25%;
	-webkit-transition: -webkit-transform 0.2s ease-in-out;
	transition: transform 0.2s ease-in-out;

	.expanded + & {
		-webkit-transform: rotate(180deg);
		transform: rotate(180deg);
	}
}

.sms-keywords {
	list-style: none;
	margin: 5px 0 0;
	max-height: 30px;
	overflow: hidden;
	padding: 0;

	&.expanded {
		max-height: none;
	}
}

.sms-keyword {
	background: #d6d9e0;
	color: #383e4c;
	cursor: pointer;
	display: inline-block;
	font-size: 12px;
	line-height: 2;
	margin: 5px 5px 0 0;
	padding: 0 10px;
	vertical-align: top;
}

.sms-disabled-keyword {
	background: #EEEEEE;
	border: 1px solid #e4e4e4;
	color: #b6b6b6;
	line-height: 1.9;
	cursor: default;
}

//.sms-keyword-type.jd,
//.sms-keyword-inserted.jd {
//	background-image: url('');
//}

//.sms-keyword-type.taobao,
//.sms-keyword-inserted.taobao {
//	background-image: url('');
//}

.sms-keyword-type {
	margin-right: 1em;

	&.active {
		color: #ff6642;
	}
}

.sms-editor .sms-keyword-inserted:disabled {
	-webkit-appearance: none;
	background-color: #fff;
	border: 0;
	box-sizing: border-box;
	color: #ff6642;
	font-size: inherit;
	height: auto;
	line-height: 1;
	margin: 0 3px;
	overflow: visible;
	padding: 0;

	.sms-no-keyword-types &,
	&.default {
		background: none;
		padding-left: 0;
	}

	&::selection {
		background: transparent;
	}

	&::-moz-selection {
		background: transparent;
	}
}

.sms-editor .sms-keyword-type:disabled,
.sms-editor .sms-keyword-inserted:disabled {
	background-repeat: no-repeat;
	background-size: auto 100%;
	//padding-left: 1.5em;
}

.sms-content-holder {
	background: #fff;
	margin-top: 10px;
	position: relative;

	&.empty:after {
		color: #e9e9e9;
		content: '请输入短信内容…';
		pointer-events: none;
		position: absolute;
			left: 14px;
			top: 14px;
	}
}

.sms-content {
	border: 1px solid #e5e5e5;
	color: #666;
	font-size: 14px;
	height: 128px;
	line-height: 1.4;
	overflow: auto;
	padding: 15px;
	position: relative;
		z-index: 1;
	word-wrap: break-word;

	&:focus {
		outline: none;
	}
}

.sms-url-tips {
	background: #ecf8fc;
	border-top: 1px solid #d2eeff;
	color: #999;
	font-size: 12px;
	line-height: 1;
	padding: 12px 10px;
	position: absolute;
		bottom: 1px;
		left: 1px;
		right: 1px;
		z-index: 2;
}

.sms-url-tips-close {
	cursor: pointer;
	float: right;
	height: 18px;
	position: absolute;
		right: 8px;
		top: 9px;
	width: 18px;

	&:before,
	&:after {
		background: #999;
		content: ' ';
		height: 2px;
		position: absolute;
			left: 4px;
			top: 8px;
		-webkit-transform: rotate(45deg);
		transform: rotate(45deg);
		width: 12px;
	}

	&:after {
		-webkit-transform: rotate(-45deg);
		transform: rotate(-45deg);
	}
}

.sms-content-footer {
	background: #f9f9f9;
	border: 1px solid #e5e5e5;
	border-top-color: #dedede;
	margin-top: -1px;
}

.sms-emotions {
	list-style: none;
	margin: 0;
	padding: 8px 12px;
	overflow: auto;

	li {
		display: inline-block;
		float: left;
		margin-right: 10px;
		line-height: 1;
	}

	img {
		vertical-align: top;
	}
}

.sms-has-url {
	color: #f00;
}
